#pragma once

#include "Service.h"
#include "GameApp.h"

class RenderService : public Service
{
public:
							RenderService();
	virtual					~RenderService();
	
	SceneManager*			AddSceneMgr(const char* name, SceneType t = ST_GENERIC);
	void					RemoveSceneMgr(const char* name);
	SceneManager*			GetSceneMgr(const char* name);

	Camera*					AddCamera(const char* name, SceneManager* sm = NULL);
	void					RemoveCamera(const char* name);
	Camera*					GetCamera(const char* name);
	
	Viewport*				CreateViewport(Camera* cam, const char* name);
	void					RemoveViewport(const char* name);
	Viewport*				GetViewport(const char* name);

	SceneManager*			GetDefSceneManager();
	Camera*					GetDefCamera();
	Viewport*				GetDefViewport();

	void					CreateDefaultRender();

protected:
	void					ClearSceneMgr();
	void					ClearViewport();

protected:
	virtual	void			OnReset();

private:
	typedef std::map<String, SceneManager*> SceneList;
	typedef std::map<String, Viewport*>		ViewportList;
		
	SceneList				m_sceneList;
	ViewportList			m_vpList;
};